﻿using System.Runtime.Serialization;
using System.Windows.Media.Media3D;
using XMLCharSheets;

namespace CombatAutomationTheater
{
    [DataContract]
    public class PathfinderLightSource
    {
        [DataMember]
        public LightControlViewModel PrimaryLightInfo;
        [DataMember]
        public LightControlViewModel SecondaryLightInfo;

        public PathfinderLightSource(LightControlViewModel priViewModel, LightControlViewModel secViewModel, Point3D location)
        {
            PrimaryLightInfo = priViewModel;
            SecondaryLightInfo = secViewModel;
            Location = location;
        }

        [DataMember]
        public Point3D Location { get; set; }

        public string Description
        {
            get
            {
                var desc = PrimaryLightInfo.Description;
                if (SecondaryLightInfo.Radius > 0)
                {
                    desc = desc + ", "+
                    SecondaryLightInfo.Description;
                }
                return desc;
            }
        }
    }
}